1 <?php
2 include(
"header.php");
3 include(
"sidebar.php");
4 include(
"dbconnection.php");
5 if
(isset($_GET[empid]))
6 {
7 $results = mysql_query(
"DELETE from customer where custid ='$_GET[empid]'");
8 }
9 $results= mysql_query(
"select * from customer");
10 //echo
"emp".mysql_num_rows($result);
11
12 ?>
13         
14                             
15         <div id=
"main">
16             
17             <a name=
"TemplateInfo"></a>
18             <h1>View Customers</h1>
19             <?php

20 if
($ctins == 1)
21 {
22     echo
"<center><b>Employees account created successfully...</b></center><br>";
23     echo
"<center><b><a href='emplogin.php'>Click here to Login.</a></b></center>";
24 }

25 else

26 {
27     ?>
28         <form id=
"form1" name="form1" method="post" action="">
29           <table width=
"579" border="1" align="left">
30             <tr>
31               <th width=
"65" scope="col">Customer<br />
32               ID</th>
33               <th width=
"104" scope="col">Customer Name</th>
34               <th width=
"109" scope="col">Email ID</th>
35     
36               <th width=
"135" scope="col">Contact Nos</th>
37               <th width=
"180" scope="col" colspan="3">Action</th>
38             </tr>
39           <?php
40           
while($arrrec = mysql_fetch_array($results))
41           {
42            echo
" <tr>
43               <td>&nbsp; $arrrec[custid]</td>
44               <td>&nbsp; $arrrec[fname] &nbsp; $arrrec[lname]</td>
45               <td>&nbsp; $arrrec[emailid]</td>
46         
47               <td>Ph. No.
1 : $arrrec[contactno1] <br> Ph. No.2 : $arrrec[contactno2]</td>
48               <td align='center'><a href='customerviewmore.php?custid=$arrrec[custid]'>More</a></td><td align='center'><a href='editcustomer.php?custid=$arrrec[custid]'>Edit</a></td><td align='center'><a href='viewcustomers.php?empid=$arrrec[custid]'>Delete</a></td>
49             </tr>"
;
50           }
51           ?>
52           </table>
53         </form>
54     <?php
55     }
56     ?>
57             <p>&nbsp;</p>
58 <br />
59                                             
60         </div>
61         
62 <!-- wrap ends here -->
63 </div>
64         
65 <?php
66 include(
"footer.php");
67 ?>


Gõ tìm kiếm nhanh...